//
//  ItemDetailViewController.h
//  Homepwner
//
//  Created by  on 12-4-22.
//  Copyright (c) 2012年 nju. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ImageStore.h"
@class ItemDetailViewController;
@protocol ItemDetailViewControllerDelegate <NSObject>
  //sss
@optional
-(void) itemDetailViewControllerWillDismiss:(ItemDetailViewController *) vc;

@end


@class Possession;
@interface ItemDetailViewController : UIViewController<UINavigationControllerDelegate,UIImagePickerControllerDelegate,UITextFieldDelegate,UIPopoverControllerDelegate>
@property (retain, nonatomic) IBOutlet UITextField *nameField;
@property (retain, nonatomic) IBOutlet UITextField *serialNumberField;
@property (retain, nonatomic) IBOutlet UITextField *valueField;
@property (retain, nonatomic) IBOutlet UILabel *dateLabel;
@property (retain, nonatomic) Possession *possession;
@property (retain, nonatomic) IBOutlet UIImageView *imageView;
@property (retain, nonatomic) UIPopoverController* imagePickerPopover;

@property (assign, nonatomic) id<ItemDetailViewControllerDelegate> delegate;

- (IBAction)takePicture:(id)sender;
- (IBAction)backgroundTapped:(id)sender;
- (IBAction)deleteImage:(id)sender;
-(id) initForNewItem:(BOOL) isNew;

@end
